package com.siyao.redvip.components.view;

import java.util.List;

import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.widget.AdapterView;
import android.widget.GridView;

/**
 * 自定义GridView
 * @author wangxuebin
 *
 */
public class MeasuredGridView extends GridView{

	private Context context;
	
	private List<String> listImageUrl;
	
	public MeasuredGridView(Context context) {
		super(context);
		this.context=context;
	}
	public MeasuredGridView(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
        this.context=context;
    }

    public MeasuredGridView(Context context, AttributeSet attrs) {
        super(context, attrs);
        this.context=context;
    }
    
 // 该自定义控件只是重写了GridView的onMeasure方法，使其不会出现滚动条，ScrollView嵌套ListView也是同样的道理，不再赘述。
    @Override
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
    	 int expandSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2, MeasureSpec.AT_MOST);
    	super.onMeasure(widthMeasureSpec, expandSpec);
    }
    
}
